/* import Mock from "mockjs"


export default {
  index: ({ url }) => {
    const { start} =url.split('?')[1].split('&').reduce((o, cur) => { 
      const [key,val] = cur.split('=')
      o[key]=val
      return o
    }, {});
    
    return Mock.mock({
      "code": "0000",
      "data": {
        [start==="100"?"list|8":"list|20"]: [
          {
            reqNo: /\d{16}/,
            carNo:  /京[A-Z]\d{6}/,
            "state|1-4": 1
          }
        ],
        total:108
      },
       "message": '处理成功'
    })
  }
} */
export default [
  {
    url: "/search",
    response: ({ query: { start } }) => {
      return {
        code: 1000,
        data: {
          [start === "100" ? "list|8" : "list|20"]: [
            {
              reqNo: /\d{16}/,
              carNo: /京[A-Z]\d{6}/,
              "state|1-4": 1
            }
          ],
          total: 108
        },
        message: "处理成功"
      }
    }
  }
]
